<?php
 include "counter.php";

pagestart();
?>
<?php pagehead("Client scripts") ?>
<BODY bgcolor="white">
<?php pagetop("Linux Counter Client Scripts") ?>

This section contains scripts that can be run on a Linux box to ease
the task of registering with the Linux Counter, and of keeping a
registration up to date.

<h2>Machine Update</h2>
This script registers or updates a machine's info in the counter.
The info registered will show up in the list of machines on your homepage.
<p>
Instructions for use:
<ul>
<li>Save <a href="machine-update">machine-update</a> to a file named
"machine-update" in any convenient place
<li>From a terminal window, change directory to that place.
<li>Change it to be executable (chmod +x machine-update)
<li>Run "./machine-update -i" to enter information
<li>Run "./machine-update -m" to send mail
<li>Run "./machine-update -c" to add it to your crontab file
</ul>
YOU DO NOT NEED TO RUN THIS AS ROOT. Running it as "any random user" is MUCH better practice. The user ID must only be able to send mail and write to its own home directory.
<p>
Here's what running machine-update -i looks like:
<pre>

prompt> machine-update -i
Here you can specify some info that the script can't know for itself
Your Linux Counter reg#, if any [2]:
Your machine's counter reg#, if any [2345]:
Here is what the program has found:
bogomips   : 35.84
accounts   : 8
name       : dokka.maxware.no
kernel     : 2.0.35
users      : 0
cpu        : 586/90 (bogo 586)
memory     : 48
mailer     : sendmail
disk       : 1851
Do you want to override some of the found values? [no]:
--------------------------------------------------------
This is what will be sent to the Linux Counter if you
run the program with the -m switch. Now, NOTHING IS SENT
--------------------------------------------------------
From: hta
To: machine-registration@counter.li.org
Subject: machine-update for dokka.maxware.no

//MACHINE
accounts: 8
bogomips: 35.84
cpu: 586/90 (bogo 586)
disk: 1851
kernel: 2.0.35
key: 2345
mailer: sendmail
memory: 48
method: machine-update version 0.09
name: dokka.maxware.no
owner: 2
uniqueid: 290176264
uptime: 45 days,  2:22
users: 0
//END
prompt>

</pre>
All the info sent to the counter is also stored in the file
"$HOME/.linuxcounter/&lt;machine&gt;. You can edit the info you
entered by hand by running "machine-update
-i".
<p>
If you have any trouble, mail the program's output, the top few lines
of the script, and any files in $HOME/.linuxcounter to
<?php print emailCloaking("help@counter.li.org") ?>
<p>
For the truly adventorous, there's always a <a href="machine-update-beta">beta version</a> available.
<p>
Happy updating!

<?php pagebottom("yes") ?>
</body>
</html>

